//引入路由组件
import Home from '@/pages/Home'
import Login from '@/pages/Login'
import Register from '@/pages/Register'
import Serach from '@/pages/Serach'
import Detail from '@/pages/Detail'
import AddCartSuccess from '@/pages/AddCartSuccess'
import ShopCart from '@/pages/ShopCart'
import Trade from '@/pages/Trade'

export default [
  {
    path: '/trade',
    name: 'trade',
    component: Trade,
    meta: {
      showFooter: true,
    },
  },
  {
    path: '/shopCart',
    name: 'shopCart',
    component: ShopCart,
    meta: {
      showFooter: true,
    },
  },
  {
    path: '/addCartSuccess',
    name: 'addCartSuccess',
    component: AddCartSuccess,
    meta: {
      showFooter: true,
    },
  },
  {
    path: '/detail/:skuid?',
    component: Detail,
    meta: {
      showFooter: true,
    },
  },
  {
    path: '/home',
    component: Home,
    meta: {
      showFooter: true,
    },
  },
  {
    path: '/login',
    component: Login,
  },
  {
    path: '/register',
    component: Register,
  },
  {
    path: '/serach/:keyword?',
    name: 'serach',
    component: Serach,
    meta: {
      showFooter: true,
    },
  },
  {
    path: '*',
    redirect: '/home',
  },
]
